<!DOCTYPE HTML>
<html>

<head>
    <meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=0">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>垂直地面的面</title>
    <style>
        body,
        html,
        #container {
            margin: 0;
            width: 100%;
            height: 100%
        }
    </style>
</head>

<body>
    <div id="container"></div>
    <script
        src="//webapi.amap.com/maps?v=1.4.15&key=2117aeb766c99a2763b91b68ce2530e8&plugin=Map3D,AMap.DistrictSearch"></script>
    <script>
        var map = new AMap.Map('container', {
            center: [118.752068, 32.05829],
            viewMode: '3D',
            labelzIndex: 130,
            pitch: 40,
            zoom: 9
        });

        var object3Dlayer = new AMap.Object3DLayer({ zIndex: 1 });
        map.add(object3Dlayer);

        var opts = {
            subdistrict: 0,
            extensions: 'all',
            level: 'city'
        };

        //利用行政区查询获取边界
        var district = new AMap.DistrictSearch(opts);
        district.search('南京市', function (status, result) {
            // bounds 中的坐标为三维坐标
            var bounds = result.districtList[0].boundaries;
            console.log(bounds);
            var height = 30000;
            var color = '#0088ffcc';//rgba
            var wall = new AMap.Object3D.Wall({
                path: bounds,
                height: height,
                color: color
            });
            wall.backOrFront = 'both';
            wall.transparent = true;
            object3Dlayer.add(wall);
        });
    </script>
</body>

</html>